<div class="container-nm update">
    <h2 class="mb-4">工具列表</h2>
    <table id="urlsTable" class="table table-striped table-bordered table-hover">
        <thead class="thead-dark">
            <tr>
                <th>ID</th>
                <th>标题</th>
                <th>内容</th>
                <th>创建人</th>
                <th>版本号</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <?php
            global $wpdb;

            $results = $wpdb->get_results("SELECT * FROM godmc_log_updated");

            if ($results) {
                foreach ($results as $row) {
                    echo "<tr>";
                    echo "<td>" . $row->id . "</td>";
                    echo "<td>" . $row->title . "</td>";
                    echo "<td>" . $row->content . "</td>";
                    echo "<td>" . $row->created . "</td>";
                    echo "<td>" . $row->version . "</td>";
                    echo "<td>" . $row->create_time . "</td>";
                    echo "<td>
                            <button class='btn btn-primary btn-sm mr-2'>编辑</button>
                            <button class='btn btn-danger btn-sm'>删除</button>
                          </td>";
                    echo "</tr>";
                }
            } else {
                echo "<tr><td colspan='7' class='text-center'>没有符合条件的数据。</td></tr>";
            }
            ?>
        </tbody>
    </table>
</div>
